/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Nguyenth.sessionBean;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import Easy.table.Places;

/**
 *
 * @author Superman
 */
@Stateless
public class PlaceSessionBean implements PlaceSessionBeanRemote, PlaceSessionBeanLocal {
    @PersistenceContext(unitName = "EasyTicket-ejbPU")
    private EntityManager em;

    public void persist(Object object) {
        em.persist(object);
    }

    public boolean addPlace(String name, String description) {

        Places p = new Places();
        p.setPlaceName(name);
        p.setDecristion(description);
        p.setStatus("1");
        persist(p);
        return true;
    }
    
    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")
 
}
